﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Daycare.DAL;

namespace Daycare.Models
{
    public class Family
    {
        public Family()
        {
        }
         
        public Family(int childId)
        {
            familyRepository = new FamilyRepository();
            Family tempFamily = familyRepository.GetFamily(childId);

            familyId = tempFamily.familyId;
            isActive = tempFamily.isActive;
            enforceApprovedPickupList = tempFamily.enforceApprovedPickupList;
        }

        public int familyId { get; set; }

        public bool isActive { get; set; }
        public bool enforceApprovedPickupList { get; set; }

        public Address billing { get; set; }
        public Address shipping { get; set; }

        public List<Contact> adults { get; set; }
        public List<Child> children { get; set; }
        public List<Note> notes { get; set; }

        public List<Document> documents { get; set; }

        public FamilyRepository familyRepository { get; set; }
    }
}